package com.fancy.learncenter.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.fancy.learncenter.common.JumpIntentKey;

/**
 * Created by shiweiwei on 2017/12/16.
 */

public class CartoonMediaBean implements Parcelable {
    /**
     * id : 468
     * imgUrl : http://img1.fancyedu.com/dev/question/images/1-1.png
     * playLink :
     * resourceName : 1-1.png
     * type : 1
     */

    private int id;
    private String imgUrl;
    private String playLink;
    private String resourceName;
    private int type;
    private JumpIntentKey.OPTION_STATUS status; // 0 默认状态 1 选中状态 2 正确 3 错误

    protected CartoonMediaBean(Parcel in) {
        id = in.readInt();
        imgUrl = in.readString();
        playLink = in.readString();
        resourceName = in.readString();
        type = in.readInt();
        status = (JumpIntentKey.OPTION_STATUS) in.readSerializable();
    }

    public static final Creator<CartoonMediaBean> CREATOR = new Creator<CartoonMediaBean>() {
        @Override
        public CartoonMediaBean createFromParcel(Parcel in) {
            return new CartoonMediaBean(in);
        }

        @Override
        public CartoonMediaBean[] newArray(int size) {
            return new CartoonMediaBean[size];
        }
    };

    public CartoonMediaBean() {
    }

    public JumpIntentKey.OPTION_STATUS getStatus() {
        return status;
    }

    public void setStatus(JumpIntentKey.OPTION_STATUS status) {
        this.status = status;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getPlayLink() {
        return playLink;
    }

    public void setPlayLink(String playLink) {
        this.playLink = playLink;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(imgUrl);
        dest.writeString(playLink);
        dest.writeString(resourceName);
        dest.writeInt(type);
        dest.writeSerializable(status);
    }
}
